<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    {js href='__STATIC__/jquery/jquery-1.11.0.min.js' /}
    {js href='__STATIC__/layui/layui.js' /}
    {CSS href="__STATIC__/layui/css/layui.css" /}
    {CSS href="__STATIC__/admin/css/global.css" /}
</head>
<body style="padding: 0px 10px;">
<br>
<form class="layui-form" action="">
    <div class="layui-form-item">
        <label class="layui-form-label">标题</label>
        <div class="layui-input-block">
            <input type="text" name="title" required  lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">类型</label>
        <div class="layui-input-block">
            <input type="radio" name="sex" value="男" title="图片">
            <input type="radio" name="sex" value="女" title="音频" checked>
            <input type="radio" name="sex" value="女" title="视频" checked>
        </div>
    </div>
</form>
</body>
<script>
    layui.use(['element','form'], function(){
        var element = layui.element;
        var form = layui.form;
        form.on('submit(formDemo)', function(data){
            layer.msg(JSON.stringify(data.field));
            return false;
        });
    });
</script>
</html>